package com.hnust.api;

import com.github.lianjiatech.retrofit.spring.boot.annotation.RetrofitClient;
import com.hnust.domain.ChangeRequest;
import com.hnust.domain.Result;
import org.springframework.stereotype.Component;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

@Component
@RetrofitClient(baseUrl = "${feign.judgeUrl}",readTimeoutMs = 50000,writeTimeoutMs = 50000,connectTimeoutMs = 50000)
public interface PaperCorreApi {
    /**
     * 改变某题的得分
     */
    @POST(value = "/change/update")
    Call<Result<Boolean>> changeScore(@Body ChangeRequest changeRequest);

    /**
     * 改变学生的批阅状态为已批改
     */
    @GET("/state/stu")
    Call<Result<Boolean>>  changeStuTestStatus(@Query("testId") String testId,@Query("studentId") String studentId);

    /**
     * 改变老师负责的相应考试状态为已批阅
     */
    @GET("/state/cla")
    Call<Result<Boolean>>  changeTeacherTestStatus(@Query("testId") String testId,@Query("teacherId") String teacherId);




}
